package com.zbkj.crmeb.store.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 功能描述: 拼团活动创建请求参数
 *
 * @Author: wangzh
 * @Date: 2022/11/28 16:58
 */
@Data
@Accessors(chain = true)
@ApiModel("ChannelGroupBookingRequest对象")
public class ChannelGroupBookingRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("拼团id")
    private Integer id;

    @ApiModelProperty("团长id")
    private Integer leaderId;

    @ApiModelProperty("活动id，一个活动对应一个值")
    private String groupId;

    @ApiModelProperty(value = "团长名称")
    private String leaderName;

    @ApiModelProperty(value = "返佣比例")
    private BigDecimal rebateRate;

    @ApiModelProperty("拼团活动名称")
    private String activityName;

    @ApiModelProperty("活动时间类型 0:长期有效 1:时间段")
    private Integer activityTimeType;

    @ApiModelProperty("拼团开始时间")
    private String activityStartTime;

    @ApiModelProperty("拼团结束时间")
    private String activityEndTime;

    @ApiModelProperty("是否使用兜底佣金:1是 0否")
    private Integer useBaseRebateRate;

    @ApiModelProperty("是否限购 0:不限购 1:限购")
    private Integer purchaseLimitType;

    @ApiModelProperty("限购数量")
    private Integer purchaseLimitNumber;

    @ApiModelProperty("商品id")
    private Integer productId;

    @ApiModelProperty("参团人数与拼团价")
    private List<StoreProductGroupActivityRequest> storeProductGroupActivities;

    @Data
    @Accessors(chain = true)
    @ApiModel("StoreProductGroupActivityRequest对象")
    public static class StoreProductGroupActivityRequest implements Serializable {

        @ApiModelProperty("参团人数")
        private Integer joinPersonNumber;

        @ApiModelProperty("对应sku价格")
        private List<StoreProductGroupPriceRequest> skuPrices;

        @Data
        @ApiModel("StoreProductGroupPriceRequest对象")
        public static class StoreProductGroupPriceRequest implements Serializable {

            @ApiModelProperty("拼团价格所属id")
            private Integer id;

            @ApiModelProperty("源skuid")
            private String sourceSkuId;

            @ApiModelProperty("拼团库存量")
            private Integer stock;

            @ApiModelProperty("拼团价")
            private BigDecimal packagePrice;
        }

    }
}
